import { defHttp } from '@/apis/http'
import type { CommonAPI } from '@/apis/schema/all'

/**
 * @description: DNS API
 */

/** 更新DNS API */
export const updateApiResolveDnsApiApi: CommonAPI<
  '/api/resolve/dns-api',
  'put'
> = (data) => defHttp.put(`/api/resolve/dns-api`, { data })

/** 创建DNS API */
export const addApiResolveDnsApiApi: CommonAPI<
  '/api/resolve/dns-api',
  'post'
> = (data) => defHttp.post(`/api/resolve/dns-api`, { data })

/** 删除DNS API */
export const deleteApiResolveDnsApiApi: CommonAPI<
  '/api/resolve/dns-api',
  'delete'
> = (data) => defHttp.delete(`/api/resolve/dns-api`, { data })

/** 查询DNS API */
export const getApiResolveDnsApisApi: CommonAPI<
  '/api/resolve/dns-apis',
  'get'
> = (params) => defHttp.get(`/api/resolve/dns-apis`, { params })
